package com.wj.multition;

/**
 * 4.多例模式
 * @author WangJin
 * @version 1.0
 * @date 2022/2/11 14:19
 */
public class Minister {
    public static void main(String[] args) {

        int ministerNum =10; //10个大臣

        for(int i=0;i<ministerNum;i++){
            Emperor emperor = Emperor.getInstance();
            System.out.print("第"+(i+1)+"个大臣参拜的是：");
            emperor.emperorInfo();
        }
    }
}
